﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace WO.GCode
{
    class Program
    {
        static void Main(string[] args)
        {
            Task.Factory.StartNew(Running);
            Task.Factory.StartNew(Running);
            Task.Factory.StartNew(Running);
            Task.Factory.StartNew(Running);
            Task.Factory.StartNew(Running);
            Console.ReadLine();
        }
      static  Dictionary<string, int> dic = new Dictionary<string, int>();
        static void Running()
        {
            
            while (true)
            {
                GUniqueCodeRedis gCode = new GUniqueCodeRedis();
                var ls = gCode.GSeqTimeCode("CEO", 20);
               
                foreach (var item in ls)
                {
                    dic.Add(item, 0);//用于检测是否成重复的id,出现重复时会出现异常
                    System.Diagnostics.Debug.WriteLine(item);
                }
                /// Thread.Sleep(10000);
            }
        }
    }
}
